package js.web.center.script.thread;

import org.apache.log4j.Logger;

import js.web.center.script.utils.JsWebScriptUtils;
/**
 * 脚本管理器
 * @author dowell
 *
 */
public class JsWebScriptThread implements Runnable {
	private static Logger logger=Logger.getLogger(JsWebScriptThread.class);
	private long sleepTime=3000;
	@Override
	public void run() {
		while(true){
			try{
				JsWebScriptUtils.getInstance().refreshScriptEngineCore();
			}catch(Exception e){
				logger.error("JsWebScriptThread ERRORL:{}",e);
			}
			try {
				Thread.sleep(sleepTime);
			} catch (InterruptedException e) {
				logger.error("JsWebScriptThread ERRORL:{}",e);
			}
		}
	}
}
